package com.yyw.gulimall.authserver.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 易煜玮
 * @ClassName WebConfig.java
 * @Description SpringMvc 配置类
 * @createTime 2020年12月09日 20:59:00
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    /**
     * 定义路由规则
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/login").setViewName("/login");
//        registry.addViewController("/").setViewName("/login");
        registry.addViewController("/register").setViewName("/register");
    }
}
